package com.cc.flyingfish.config;

import com.alibaba.cloud.seata.web.SeataHandlerInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * @author CHENCHEN
 * @title
 * @createTime 2023-03-08 20:29
 */
@Configuration
public class SeataWebMvcConfig extends WebMvcConfigurationSupport {

    @Override
    protected void addInterceptors(InterceptorRegistry registry) {
        System.out.println("allalalalalalallalalallalalalallalala");
        registry.addInterceptor(new SeataHandlerInterceptor()).addPathPatterns("/**");
    }
}
